<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/commons/pages/taglibs.jsp" %>

<span style="padding-left:20px;">刷新时间：
<select id="selInterval">
  <option value="10000">10</option>
  <option value="20000">20</option>
  <option value="30000">30</option>
  <option value="40000">40</option>
  <option value="60000">60</option>
</select>
秒
<input id="btnStartRefresh" type="button" value="自动刷新" onclick="autoRefresh()" />
<input id="btnStopRefresh" type="button" value="停止刷新" onclick="stopRefresh()" disabled />
</span> 
<script type="text/javascript">
var timerTask;
function autoRefresh(){
	timerTask = setInterval("doSearch()", $("#selInterval option:selected").val()); 
	$("#selInterval, #btnStartRefresh").prop("disabled", true);
	$("#btnStopRefresh").prop("disabled", false);
}
function stopRefresh() {
	clearInterval(timerTask);
	$("#selInterval, #btnStartRefresh").prop("disabled", false);
	$("#btnStopRefresh").prop("disabled", true);
}
</script> 
